
const H_SRC = 'http://amierzhandui.com';
var boolShow=true;
//本地缓存
function set(type, value) { 
    localStorage.setItem(type, value);
}

function get(type) {
    return localStorage.getItem(type);
}
var token;
token=get("token");

$("footer").on("tap","a",function(){
	if(token==null||token=="null"){
		mui.openWindow({
			url:'login.html',
			id:'login.html',
			createNew:true, 
			show: {
				autoShow: true,
				aniShow: 'slide-in-right',
				duration: 200
			}
		});
	}else{
		var href=$(this).attr("data-href");
		mui.openWindow({
			url:href,
			id:href,
			createNew:true,
			show: {
				autoShow: true,
				aniShow: 'slide-in-right',
				duration: 200
			}
		});
	}
})

var mask=mui.createMask(callback);
function callback(){
	$(".shareWx").addClass("mui-hidden");
	$(".signmoney").addClass("mui-hidden");
}
$(".shareBtn").on("tap",function(){
	mask.show();
	$(".shareWx").removeClass("mui-hidden");
})
$(".cancleShare").on("tap",function(){
	mask.close();
	$(".shareWx").addClass("mui-hidden");
})
//分享朋友圈
var sharewx = null;
// 监听plusready事件  
document.addEventListener( "plusready", function(){
	// 扩展API加载完毕，现在可以正常调用扩展API
	plus.share.getServices( function(s){
		for(var i in s){
			if('weixin'==s[i].id){
				sharewx=s[i];
			} 
		}
	}, function(e){
		mui.toast( "获取分享服务列表失败");
	} );
}, false ); 

 
function plusReady(){
	// 设置系统状态栏背景为红色
	plus.navigator.setStatusBarBackground('#3A3E41');
	plus.navigator.setStatusBarStyle('light');
}
if(window.plus){
	plusReady();
}else{
	document.addEventListener('plusready', plusReady, false);
}
